Optimal. Leaf size=46 \[ -\frac{a^2 \cot (e+f x)}{f}+\frac{2 a b \tan (e+f x)}{f}+\frac{b^2 \tan ^3(e+f x)}{3 f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0544183, antiderivative size = 46, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.087, Rules used = {3663, 270} \[ -\frac{a^2 \cot (e+f x)}{f}+\frac{2 a b \tan (e+f x)}{f}+\frac{b^2 \tan ^3(e+f x)}{3 f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3663
Rule 270
Rubi steps
\begin{align*} \int \csc ^2(e+f x) \left (a+b \tan ^2(e+f x)\right )^2 \, dx &=\frac{\operatorname{Subst}\left (\int \frac{\left (a+b x^2\right )^2}{x^2} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac{\operatorname{Subst}\left (\int \left (2 a b+\frac{a^2}{x^2}+b^2 x^2\right ) \, dx,x,\tan (e+f x)\right )}{f}\\ &=-\frac{a^2 \cot (e+f x)}{f}+\frac{2 a b \tan (e+f x)}{f}+\frac{b^2 \tan ^3(e+f x)}{3 f}\\ \end{align*}
Mathematica [A] time = 0.468013, size = 44, normalized size = 0.96 \[ \frac{b \tan (e+f x) \left (6 a+b \sec ^2(e+f x)-b\right )-3 a^2 \cot (e+f x)}{3 f} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.046, size = 48, normalized size = 1. \begin{align*}{\frac{1}{f} \left ({\frac{{b}^{2} \left ( \sin \left ( fx+e \right ) \right ) ^{3}}{3\, \left ( \cos \left ( fx+e \right ) \right ) ^{3}}}+2\,\tan \left ( fx+e \right ) ab-{a}^{2}\cot \left ( fx+e \right ) \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.02274, size = 55, normalized size = 1.2 \begin{align*} \frac{b^{2} \tan \left (f x + e\right )^{3} + 6 \, a b \tan \left (f x + e\right ) - \frac{3 \, a^{2}}{\tan \left (f x + e\right )}}{3 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.87401, size = 157, normalized size = 3.41 \begin{align*} -\frac{{\left (3 \, a^{2} + 6 \, a b - b^{2}\right )} \cos \left (f x + e\right )^{4} - 2 \,{\left (3 \, a b - b^{2}\right )} \cos \left (f x + e\right )^{2} - b^{2}}{3 \, f \cos \left (f x + e\right )^{3} \sin \left (f x + e\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (a + b \tan ^{2}{\left (e + f x \right )}\right )^{2} \csc ^{2}{\left (e + f x \right )}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.64249, size = 59, normalized size = 1.28 \begin{align*} \frac{b^{2} \tan \left (f x + e\right )^{3} + 6 \, a b \tan \left (f x + e\right ) - \frac{3 \, a^{2}}{\tan \left (f x + e\right )}}{3 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]